<template>
  <view class="account">
        <view class="account-info">
            <view>
                <view class="tip">可提现余额 (元)</view>
                <view class="body">{{solid}} </view>
            </view>
            <view @click="toCommit" class="commit">
                立即提现
            </view>
        </view>

        <view class="tip-content">

            <view v-for="item in tipContent" :key="item">{{item}}</view>

        </view>
        <view class="agree">
            

            <fui-checkbox-group name="checkbox" v-model="vals" @change="change">
                    <fui-label  >
                        <view class="fui-align__center">
                            <fui-checkbox scaleRatio="0.8" value="2"></fui-checkbox>
                        </view>
                    </fui-label>
            </fui-checkbox-group>
            

            
            
            我已阅读并遵守

            
            <text>《共享经济合作伙伴协议》</text></view>


  </view>
</template>

<script setup lang="ts">
import  type{ IGetUserIncomInfoResponse } from "@/api/model/dyUserCodeModel";
interface IProps {
    dateInfo:IGetUserIncomInfoResponse | undefined
    aliCode:string | undefined | null
}
const props = withDefaults(defineProps<IProps>(), {})
const solid = computed(()=>{
    return  props.dateInfo ? props.dateInfo.solid ? (props.dateInfo.solid / 100).toFixed(2) : '0.00' : '0.00'
})
const vals = ref(false)

const tipContent = ref([
    "收益次日结算",
    "余额满20元即可提现",
    "工作日16:00前提现的当日到款",
    "工作日16:00后提现的次日到款",
    "打款时间:工作日16:00-18:00"
])

const toCommit = ()=>{
    if(!vals.value){
        uni.showToast({
        title: "请阅读共享经济合作伙伴协议",
        duration: 2000,
        icon:"none"
      });
      return
    }
    if(Number(solid.value) < 20){
        uni.showToast({
        title: "金额不足",
        duration: 2000,
        icon:"none"
      });
    }
}

const change = ()=>{

}

</script>

<style lang="scss" scoped>
.account{
    background: linear-gradient(to bottom right, rgb(244, 253, 255), rgb(255, 251, 242));
    margin-top: 28rpx;
    border-radius: 18rpx;
    padding-bottom: 20rpx;
    .account-info{
        .tip{
            font-size: 23rpx;
            color: $uni-text-color-disable;
        }
        .body{
            font-weight: bolder;
        }
        .commit{
            font-size: 23rpx;
            color: white;
            height: 55rpx;
            line-height: 53rpx;
            padding: 0 50rpx;
            border-radius: 28rpx;
            background-color: blueviolet;
        }
        border-bottom: 1rpx solid #ececec;
        padding: 20rpx;
        padding-bottom: 30rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 60rpx;
    }
    .tip-content view{
        color: rgb(144,124,255);
        padding: 20rpx 0 0 20rpx ;
        font-size: 23rpx;
    }
    .agree{
        padding: 20rpx;
        font-size: 23rpx;
        display: flex;
        align-items: center;
        color: rgb(144,124,255);
        .fui-align__center{
            margin-right: 10rpx;
        }
        text{
            border-bottom: 1rpx solid black;
        }
    }
}

</style>
